<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>教师表</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  //编写自定义JS代码
  </script>
 </head>
 <body>
		<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="teacherController.do?doUpdate" >
					<input id="id" name="id" type="hidden" value="${teacherPage.id }"/>
		<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
					<tr>
						<td align="right">
							<label class="Validform_label">
								教师工号:
							</label>
						</td>
						<td class="value">
						    <input id="teacherNo" name="teacherNo" type="text" maxlength="20" style="width: 150px" class="inputxt"  validType="teacher,teacher_no,id" datatype="*" ignore="checked"  value='${teacherPage.teacherNo}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">教师工号</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								教师姓名:
							</label>
						</td>
						<td class="value">
						    <input id="teacherName" name="teacherName" type="text" maxlength="50" style="width: 150px" class="inputxt"  ignore="checked"  value='${teacherPage.teacherName}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">教师姓名</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								手机号码:
							</label>
						</td>
						<td class="value">
						    <input id="telphone" name="telphone" type="text" maxlength="20" style="width: 150px" class="inputxt"  datatype="m" ignore="checked"  value='${teacherPage.telphone}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">手机号码</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								电子邮箱地址:
							</label>
						</td>
						<td class="value">
						    <input id="email" name="email" type="text" maxlength="50" style="width: 150px" class="inputxt"  datatype="e" ignore="ignore"  value='${teacherPage.email}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">电子邮箱地址</label>
						</td>
					</tr>
				
			</table>
		</t:formvalid>
		<div class="easyui-layout" fit="true">
			<div region="center" style="padding: 0px; border: 0px">
				<t:datagrid name="" pagination="true"
					fitColumns="true" title="" sortName="" actionUrl="" idField="">
					<t:dgToolBar title="修改" icon="icon-edit" funname="updateInfo"></t:dgToolBar>
					<t:dgToolBar title="取消" icon="icon-remove" funname="cancel"></t:dgToolBar>
				</t:datagrid>
			</div>
		</div>
		<script type="text/javascript">
		function updateInfo(){

			var form=$("#formobj").Validform();
			$.ajax({
				url:"teacherController.do?doUpdate",
				data:$("#formobj").serialize(),
				success : function(result){
					var d = JSON.parse(result);
					var icon = d.success == true?1:2;
					layer.open({
						title:$.i18n.prop('tip.title'),
						offset:'rb',
						content:d.msg,
						time:6000,
						btn:false,
						shade:false,
						icon:icon,
						skin:'jz',

						shift:2
					});
				}
			})
			//form.submitForm(true);
		}
		
		function cancel(){
			location.reload();
		}
	</script>
 </body>
